<template>
    <view class="goods-bottom iphonex-footer flex-row">
        <view class="goods-bottom-box flex-row">
            <view class="goods-bottom-main flex-row">
                <view class="goods-bottom-block" @click="addShoppingCart">
                    <image class="goods-bottom-pic" src="https://cdn.quantifynet.cn/dti/icon_add_shopping_car@2x.png"></image>
                    <view class="goods-bottom-word">加入购物车</view>
                </view>
            </view>

            <view class="goods-bottom-pay" @click="gotoPayment">立即购买</view>
        </view>
    </view>
</template>

<script>
export default {
    data() { 
        return {}; 
    },
    onLoad(option) {},
    onShow() {},
    methods: {
        addShoppingCart() {
            this.$emit('addShoppingCart');
        },
        gotoPayment() {
            this.$emit('gotoPayment');
        }
    }
};
</script>

<style lang="less">
.goods-bottom {
    width: 750rpx;
    height: 152rpx;
    background: #ffffff;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 999;

    .goods-bottom-box {
        align-items: center;
        justify-content: space-between;
        padding: 20rpx 40rpx;
        width: 750rpx;
        height: 152rpx;
        box-sizing: border-box;
        .goods-bottom-main {
            align-items: center;
            justify-content: space-between;
            margin-right: 30rpx;
            .goods-bottom-block {
                margin-right: 30rpx;
                .goods-bottom-pic {
                    width: 51rpx;
                    height: 44rpx;
                    margin: 0 auto;
                    display: block;
                }
                .goods-bottom-word {
                    font-size: 24rpx;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #333333;
                    margin-top: 10rpx;
                    white-space: nowrap;
                    text-align: center;
                }
            }
        }
        .goods-bottom-pay {
            width: 470rpx;
            height: 90rpx;
            background: #891e07;
            border-radius: 8rpx;
            font-size: 28rpx;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #ffffff;
            display: flex;
            margin-left: 14rpx;
            align-items: center;
            justify-content: center;
        }
    }
}
</style>
